/* 
	路由
*/
import Vue from 'vue'
import VueRouter from 'vue-router'

// 四个路由页
import Layout from '../views/Layout'
import Home from '../views/Home'
import Search from '../views/Search'
import Play from '../views/Play'

Vue.use(VueRouter)

const router = new VueRouter({
	routes: [{
			path: '/',
			redirect: '/layout'
		},
		{
			path: '/layout',
			component: Layout,
			children: [{
				path: '/',
				redirect: 'home'
			}, {
				path: 'home',
				component: Home,
				meta: {
					title: '首页'
				}
			}, {
				path: 'search',
				component: Search,
				meta: {
					title: '搜索'
				}
			}]
		}, {
			path: '/play',
			component: Play
		},
	]
})

export default router
